openvswitch: enforce the use of the python binary from `packages`
authorAlexandru Ardelean <[email protected]>
Sat, 17 Jun 2017 19:05:08 +0000 (22:05 +0300)
committerAlexandru Ardelean <[email protected]>
Thu, 29 Jun 2017 10:48:42 +0000 (13:48 +0300)
Seems it was not failing for me because it was probably
using my host Python, which may have the `six` package
available.

This patch enforces the use of the packaged Python.
That way, it's more consistent that the python-six
package is available.

Signed-off-by: Alexandru Ardelean <[email protected]>
net/openvswitch/Makefile
net/openvswitch/patches/0003-override-pythonpath-via-make-vars.patch [new file with mode: 0644]

index 9ed3a3f0238c60cdf2ea678a447ff45f93fe2055..eabe2bc4ab43b0decffed277895416763d754b45 100644 (file)
@@ -118,7 +118,10 @@ CONFIGURE_ARGS += --enable-shared
 TARGET_CFLAGS += -flto -std=gnu99
 
 CONFIGURE_VARS += KARCH=$(LINUX_KARCH)
-MAKE_FLAGS += ARCH="$(LINUX_KARCH)"
+MAKE_FLAGS += \
+       ARCH="$(LINUX_KARCH)" \
+       PYTHONPATH="$(HOST_PYTHONPATH)" \
+       PYTHON="$(HOST_PYTHON_BIN)"
 
 define OvsBinUtility
   define Package/openvswitch-$(1)
diff --git a/net/openvswitch/patches/0003-override-pythonpath-via-make-vars.patch b/net/openvswitch/patches/0003-override-pythonpath-via-make-vars.patch
new file mode 100644 (file)
index 0000000..bd1c158
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/Makefile.am b/Makefile.am
+index a4dd7b8..099a3c1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -53,7 +53,7 @@ endif
+ # foo/__init__.py into an (older) version with plain foo.py, since
+ # foo/__init__.pyc will cause Python to ignore foo.py.
+ run_python = \
+-      PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
++      PYTHONPATH=$(top_srcdir)/python$(psep)$(PYTHONPATH) \
+       PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
+ ALL_LOCAL =
+diff --git a/Makefile.in b/Makefile.in
+index 8df66e2..98b54bf 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1654,7 +1654,7 @@ AM_CFLAGS = -Wstrict-prototypes $(WARNING_FLAGS) $(OVS_CFLAGS) \
+ # foo/__init__.py into an (older) version with plain foo.py, since
+ # foo/__init__.pyc will cause Python to ignore foo.py.
+ run_python = \
+-      PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
++      PYTHONPATH=$(top_srcdir)/python$(psep)$(PYTHONPATH) \
+       PYTHONDONTWRITEBYTECODE=yes $(PYTHON)